from typing import Any

import enum
DOUBLE: Any
FIXED_WIDTH_BYTES: Any
FLOAT: Any
INT32: Any
INT64: Any
VARIABLE_WIDTH_BYTES: Any

def __pyx_unpickle___Pyx_EnumMeta(*args, **kwargs) -> Any: ...
def __reduce_cython__(self) -> Any: ...
def __setstate_cython__(self, __pyx_state) -> Any: ...

class FieldDefinition:
    name: Any = ...
    type: Any = ...
    __pyx_vtable__: Any = ...
    @classmethod
    def __init__(self, *args, **kwargs) -> None: ...
    def __reduce__(self) -> Any: ...
    def __setstate__(self, state) -> Any: ...

class FieldType(enum.IntEnum):
    __new__: Any = ...
    DOUBLE: Any = ...
    FIXED_WIDTH_BYTES: Any = ...
    FLOAT: Any = ...
    INT32: Any = ...
    INT64: Any = ...
    VARIABLE_WIDTH_BYTES: Any = ...
    _generate_next_value_: Any = ...
    _member_map_: Any = ...
    _member_names_: Any = ...
    _member_type_: Any = ...
    _value2member_map_: Any = ...

class RedisConnection:
    redis_hostname: Any = ...
    redis_password: Any = ...
    redis_port: Any = ...
    @classmethod
    def __init__(self, *args, **kwargs) -> None: ...
    def __reduce__(self) -> Any: ...
    def __setstate__(self, state) -> Any: ...

class StreamDoesNotExistException(RuntimeError): ...

class StreamExistsException(RuntimeError): ...

class StreamReader:
    good: Any = ...
    initialized_at_us: Any = ...
    metadata: Any = ...
    schema: Any = ...
    stream_name: Any = ...
    total_samples_read: Any = ...
    @classmethod
    def __init__(self, *args, **kwargs) -> None: ...
    def initialize(self, stream_name: unicode, timeout_ms: int) -> Any: ...
    def read(self, arr: ndarray, timeout_ms: int) -> int: ...
    def stop(self) -> None: ...
    def tail(self, arr, timeout_ms) -> int: ...
    def __bool__(self) -> Any: ...
    def __reduce__(self) -> Any: ...
    def __setstate__(self, state) -> Any: ...

class StreamReaderException(RuntimeError): ...

class StreamSchema:
    field_definitions: Any = ...
    __pyx_vtable__: Any = ...
    @classmethod
    def __init__(self, *args, **kwargs) -> None: ...
    def dtype(self) -> dtype: ...
    def from_dtype(self, *args, **kwargs) -> Any: ...
    def __reduce__(self) -> Any: ...
    def __setstate__(self, state) -> Any: ...

class StreamWriter:
    initialized_at_us: Any = ...
    metadata: Any = ...
    schema: Any = ...
    stream_name: Any = ...
    total_samples_written: Any = ...
    @classmethod
    def __init__(self, *args, **kwargs) -> None: ...
    def initialize(self, stream_name: unicode, schema: StreamSchema, user_metadata: dict) -> Any: ...
    def stop(self) -> None: ...
    def write(self, arr: ndarray) -> None: ...
    def __reduce__(self) -> Any: ...
    def __setstate__(self, state) -> Any: ...

class StreamWriterException(RuntimeError): ...
